#pragma once
#include"HashTable.h"


template<class K>
struct KeyofSet
{
	const K& operator()(const K& key)
	{
		return key;
	}
};

template<class K,class HF = Hash<K>>
class Unordered_set
{
public:
	typedef typename LinkHash::HashTable<K, K, KeyofSet<K>, Hash<K>>::iterator iterator;

	iterator begin()
	{
		return hst.begin();
	}

	iterator end()
	{
		return hst.end();
	}

	bool insert(const K& data)
	{
		return hst.Insert(data);
	}

	bool Erase(const K& key)
	{
		return hst.Erase(key);
	}

	LinkHash::HashNode<K>* Find(const K& key)
	{
		return hst.Find(key);
	}

private:
	LinkHash::HashTable<K, K, KeyofSet<K>, Hash<K>> hst;
};